import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/home/Home.vue";
import Article from "../views/article/Article.vue";
// import Recall from "../views/recall/Recall.vue";
// import Time from "../views/time/Time.vue";
import Tag from "../views/tag/Tag.vue";
// import We from "../views/we/We.vue";
import Link from "../views/link/Link.vue";
import About from "../views/about/About.vue";
import Message from "../views/message/Messsage.vue";
import ArticleList from "../components/ArticleList.vue";
import User from "../views/user/User.vue";
import Photo from "../views/photo/Photo.vue";
import Error from "../views/404/Error.vue";
import OauthLogin from "../components/OauthLogin.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: Home,
    meta: {
      title: "林邵晨的个人网站"
    }
  },
  {
    path: "/photo",
    component: Photo,
    meta: {
      title: "相册"
    }
  },
  {
    path: "/error",
    component: Error,
    meta: {
      title: "404"
    }
  },
  // {
  //   path: "/we/recall",
  //   component: Recall,
  //   meta: {
  //     title: "回忆"
  //   }
  // },
  // {
  //   path: "/we/time",
  //   component: Time,
  //   meta: {
  //     title: "时间"
  //   }
  // },
  // {
  //   path: "/we",
  //   component: We,
  //   meta: {
  //     title: "我们"
  //   }
  // },
  {
    path: "/resource",
    component: Tag,
    meta: {
      title: "资源"
    }
  },
  {
    path: "/resource/details/:articleId",
    component: Article,
    // name:'details',
    meta: {
      title: "资源详情"
    }
  },
  {
    path: "/resource/*",
    component: ArticleList
  },
  {
    path: "/links",
    component: Link,
    meta: {
      title: "友链列表"
    }
  },
  {
    path: "/about",
    component: About,
    meta: {
      title: "关于我"
    }
  },
  {
    path: "/message",
    component: Message,
    meta: {
      title: "留言板"
    }
  },
  {
    path: "/user",
    component: User,
    meta: {
      title: "个人中心"
    }
  },
  {
    path: "/oauth/login/qq",
    component: OauthLogin
  },
  {
    path: "/oauth/login/weibo",
    component: OauthLogin
  }
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes
});

export default router;
